﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="ShowTinTuc.aspx.cs" Inherits="WebBanThuoc.ShowTinTuc" %>

<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">
<script type="text/javascript">
         $(document).ready(function () {
           var $chosen = <%=Request.QueryString["trang"] %>;
             $(".page").click(function () {
                 $(this).addClass("page_click");
             });
             $(".page").each(function () {
                 if ($(this).html() == $chosen) {
                     $(this).addClass("page_click");
                 }
             });


         });
</script>
<div class="tran_nav">
    <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb" style="width:30px; display:inline;">
          <a href="TrangChu.aspx" itemprop="url" >
            <span itemprop="title">Trang chủ</span>
          </a> <font>»</font>
        </div>  
        <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb" style="width:30px;  display:inline;">
              <span itemprop="title">Sức khỏe & đời sống</span>
        </div> 
</div>
 <script>
    $(document).ready(function () {
        var sotheloai = $(".rows").length; 
        if (sotheloai % 2 == 1) $('.rows:last').css('width', '585px'); 
    });
</script>


<div id="tinmoi">
<% System.Collections.Generic.List<WebBanThuoc.DTO.TinTuc> listTT = Session["listTT"]
                     as System.Collections.Generic.List<WebBanThuoc.DTO.TinTuc>;%>

  
<% if (listTT.Count > 0)
   { %>
  
   <% for (int i = 0; i < listTT.Count; i++)
      {%>
        
         <div class="rows">
             <a href="ChiTietTin.aspx?idTinTuc=<%=listTT[i].IDTinTuc%>&MaDanhMuc=<%=listTT[i].MaDanhMuc%>"><%=listTT[i].TenTinTuc%> </a>
   	         <div class="brief"> <%=listTT[i].NoiDungSoLuoc%>  </div>
        </div> <!-- rows -->
     <%} %>
   <% } %>

<div style="clear:both"></div>
</div> <!-- tinmoi -->
 <!--bắt đầu trang -->
    <div class="paging">
     <%int tt_tongSoTrang = Session["tt_tongSoTrang"] != null ? Convert.ToInt32(Session["tt_tongSoTrang"]) : 0;
          for (int i = 1; i <= tt_tongSoTrang; i++)
          { %>
            <a href='ShowTinTuc.aspx?MaDanhMuc=<%= Request.Params["MaDanhMuc"] %>&trang=<%= i %>'> <span class='page'><%= i %></span></a>
            <%}%>
    </div> 
        <!--kết thúc trang -->



<% Session.Remove("listTT");%>
<% Session.Remove("tt_tongSoTrang");%>
<style>
    #tinmoi{ width:595px; background-color: #EAF794; margin-left:3px;}
   #tinmoi .rows {float:left; width:290px;  margin-bottom:5px; margin-left:5px; margin-top:5px; background-color:#FFF; min-height:200px; overflow:hidden }
   .brief{ margin: 5px; padding:5px; font-size:14px;color: Black;}
   #tinmoi  a {text-decoration:none; color:#8DC50A; font-size:16px; font-weight:bold; margin:5px;line-height:35px;} 
   #tinmoi  a:hover{ text-decoration:none; color:#000}
      
</style>
</asp:Content>
